package com.manster.service;

import com.manster.entity.SysUser;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author manster
 * @since 2022-03-13
 */
public interface SysUserService extends IService<SysUser> {

    //根据用户名获取用户对象
    SysUser getByUsername(String username);

    //根据用户id获取角色权限信息
    String getUserAuthorityInfo(Long userId);

    //删除用户权限信息缓存
    void clearUserAuthorityInfo(String username);

    //角色列表发生改变，进行删除
    void clearUserAuthorityInfoByRoleId(Long roleId);

    //权限列表发生改变，进行删除
    void clearUserAuthorityInfoByMenuId(Long menuId);

    //根据邮箱获取用户信息
    SysUser getByEmail(String email);
}
